package com.example.home.fragment

import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.databinding.DataBindingUtil
import com.example.home.R
import com.example.home.activity.FingerShapeAct
import com.example.home.databinding.FragHomeBinding

/**
 * author：jiazhijie
 * date：2025/10/14
 * desc：首页
 * modify record：
 */
class HomeFrag: Fragment() {

    companion object {
        fun newInstance() = HomeFrag()
    }

    private lateinit var binding : FragHomeBinding

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {

        binding = DataBindingUtil.inflate(inflater,R.layout.frag_home,container,false)
        return binding.root

    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        initView()

    }

    private fun initView() {
        // 设置点击事件
        binding.homeScalesExperience.setOnClickListener {
            val intent = Intent(requireContext(), FingerShapeAct::class.java)
            startActivity(intent)
        }
    }



}